/*
 * @Date: 2025-04-22 16:01:15
 * @Auth: 873768511@qq.com
 * @LastEditors: 463997479@qq.com
 * @LastEditTime: 2025-09-25 15:16:33
 * @FilePath: \corpus\src\pages\resourceManagement\list\component\BasicInfo\index.tsx
 */
import { Card, Descriptions } from 'antd';
import Container from '../../hooks';
export default () => {
  const {
    resourceDetail: { data },
    tabKey,
    tabsType,
  } = Container.useContainer();
  const getParseJson = (data: string | undefined) => {
    if (!data) return '-';
    try {
      const arr = JSON?.parse(data)?.map((item: { id: string; name: string }) => item?.name);
      return arr.join('、');
    } catch (error) {
      return data;
    }
  };
  return (
    <Card>
      <Descriptions column={2}>
        <Descriptions.Item label="原始数据资源数量">{data?.groupNumber ?? '-'}</Descriptions.Item>
        <Descriptions.Item label="知识库数量">{data?.knowledgeNumber ?? '-'}</Descriptions.Item>
        <Descriptions.Item label="语料库数量"> {data?.corpusNumber ?? '-'}</Descriptions.Item>
        <Descriptions.Item label="知识库高质量数据集数量">
          {data?.heightKnowledgeNumber ?? '-'}
        </Descriptions.Item>
        <Descriptions.Item label="原始数据数量">{data?.fileNumber ?? '-'}</Descriptions.Item>
        <Descriptions.Item label="知识库文件数量">
          {data?.knowledgeFileNumber ?? '-'}
        </Descriptions.Item>
        <Descriptions.Item label="语料库语料文件数量">
          {data?.corpusFileNumber ?? '-'}
        </Descriptions.Item>
        <Descriptions.Item label="语料库高质量数据集数量">
          {data?.heightCorpusNumber ?? '-'}
        </Descriptions.Item>
      </Descriptions>
    </Card>
  );
};
